Conversation
…nstead of ArrayIndexOutOfBoundsException for Integer.MIN_VALUE offset
|
👋 Welcome back semery! A progress list of the required criteria for merging this PR into |
|
@smemery This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 213 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@seanjmullan, @sendaoYan) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
Webrevs
|
|
/integrate |
| boolean weak = DESKeySpec.isWeak(strongKey, Integer.MIN_VALUE); | ||
| throw new Exception("expected ArrayIndexOutOfBoundsException"); | ||
| } catch (ArrayIndexOutOfBoundsException aiobe) {} | ||
| try{ |
There was a problem hiding this comment.
There are several try{ missed a whitespace
There was a problem hiding this comment.
Fixed in latest delta.
| * @summary DESKeySpec.isWeak should throw aiobe exception if the offset is | ||
| * negative. | ||
| * @bug 8364121 8386473 | ||
| * @summary Test DES[ede]KeySpec for negative and integer overflow offsets | ||
| */ | ||
| import java.security.InvalidKeyException; |
There was a problem hiding this comment.
'import InvalidKeyException' seems useless.
There was a problem hiding this comment.
Good catch, removed.
|
/integrate |
|
@smemery This pull request has not yet been marked as ready for integration. |
|
/integrate |
|
/sponsor |
|
Going to push as commit 1ad2db7.
Your commit was automatically rebased without conflicts. |
|
@seanjmullan @smemery Pushed as commit 1ad2db7. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
|
/backport :jdk27 |
|
@smemery the backport was successfully created on the branch backport-smemery-1ad2db7a-jdk27 in my personal fork of openjdk/jdk. To create a pull request with this backport targeting openjdk/jdk:jdk27, just click the following link: The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:
If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk: |
This fix includes throwing the correct exception when an offset for the key length check would cause an integer overflow therefore throwing the wrong exception.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/31494/head:pull/31494$ git checkout pull/31494Update a local copy of the PR:
$ git checkout pull/31494$ git pull https://git.openjdk.org/jdk.git pull/31494/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 31494View PR using the GUI difftool:
$ git pr show -t 31494Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/31494.diff
Using Webrev
Link to Webrev Comment